package com.huawei.fastble;

import com.clj.fastble.data.BleDevice;

import ohos.aafwk.ability.AbilityPackage;
import ohos.app.Context;
import ohos.bluetooth.ble.GattCharacteristic;
import ohos.bluetooth.ble.GattService;

/**
 * MyApplication
 */
public class FastBleMyApplication extends AbilityPackage {
    public static Context context;

    @Override
    public void onInitialize() {
        super.onInitialize();

        context = getApplicationContext();
    }

    public static BleDevice bleD;

    public static void setBleDevice(BleDevice bleDevice) {
        bleD = bleDevice;
    }

    public static BleDevice getBleDevice() {
        return bleD;
    }

    public static GattService gattService;

    public static GattService getGattService() {
        return gattService;
    }

    public static void setGattService(GattService gattService) {
        FastBleMyApplication.gattService = gattService;
    }

    public static GattCharacteristic gattCharacteristic;

    public static GattCharacteristic getGattCharacteristic() {
        return gattCharacteristic;
    }

    public static void setGattCharacteristic(GattCharacteristic gattCharacteristic) {
        FastBleMyApplication.gattCharacteristic = gattCharacteristic;
    }

    public int characteristicState;
}
